/*
**  File: AquaFuncts.h
*/
Boolean Check_General_Options ( void );
void ProjectInit( void );
FILE *AquaDataFile( char *file );
char *AquaFileName( const Qtyp type, Typnam ident, char *filnam );
FILE *OpenAquaFile( const Qtyp type, char *mode, char *filnam, const Boolean reuse );
Boolean ReadAquaIDLines( FILE *fp );
void WriteAquaIDLines( FILE *fp, const Qtyp qtype, Filnam filnam );
char *ProcessAquaLine( char *line, char *descr, char *inp,
                       const int size, FILE *fp );
char *QtypSel( const Qtyp type );
char *QtypTxt( const Qtyp type );
Filtyp QtypFil( const Qtyp type );
char *FiltypNam( const Filtyp type );
char *FiltypLIBNam( const Filtyp type );
char *FiltypExt( const Filtyp type );
int ContactRangeCount( void );
char *ContactRangeNam( const ContactRange type );
char *ContactRangeStarNam( const ContactRange type );
int ContactRangeIndex( const ContactRange type );
void MapAtomsInSet( Strucset *set, const int how, char *lib_nam );
void MapAtomsInMol( Mol *molptr, const int how, char *lib_nam_orig, Filnam predef_nam );
void MapAtoms( Atom *atoms, int atom_count, Mol *atmap_mol,
               const int how, const Boolean guess, FctFindAt FindAtom );
void MapPtrAtoms( Atomptr *atomptrs, int atom_count, Mol *atmap_mol,
                  const int how, const Boolean guess, FctFindAt FindAtom );
void MakeResidues( Strucset *set, Boolean sort );
void MakeUniqResid( Atom *atom );
void ReadUniqResid( Atom *atom );
void WriteResidues( FILE *fp, Residue *residues, const int count );
void CoordZero( Coord *v );
void CoordAdd( Coord *v, const Coord c );
void CoordDiv( Coord *v, const int n );
Atom FillAtom( Resid res_id, ID res_nam, ID atom_nam, const int which );
Atom *FindAtom1( int *idx, Atom *at, Mol *molptr, const int which, const Boolean guess );
Atom *FindAtom2( int *idx, Atom *theAtom, Mol *molptr, const int which,
                 const Boolean guess );
Atom *FindAtom3( int *idx, Atom *at, Mol *molptr, const int which,
                 const Boolean guess );
void TestFindAtom2( Mol *molptr );
Atomptr *FindAtomsWC( int *nmatch, Atom *at, Mol *molptr, const int which );
void WriteNotFoundAtom( FILE *fp, Atom *atom, const int find_which,
                        const int print_which );
int FindResidueIndexFromNum( const int res_num, Mol *molptr );
int FindResidueIndexFromOrigNum( const int res_num, ID chain, char insert,
                                 Mol *molptr );
int FindResidueIndexFromId( Resid res_id, Mol *molptr );
int FindResidueNumFromId( Resid res_id, Mol *molptr );
char *FindResidueNamFromId( Resid res_id, Mol *molptr );
void InitAtomS( Atom *atom, int count );
void InitAtom( Atom *atom );
void InitPsatomS( Psatom *psatom, int count );
void InitPsatom( Psatom *psatom );
char *GetLIBName( const int option );
Mol *ProcessAtomLIB( Mol *molptr, char *lib_nam, Filnam predef );
Psatom *ProcessStereoLIB( int *stereo_count, Mol *molptr, char *lib );
Psatom *ExpandPsatoms( Psatom *psatoms, int *pseudo_count, Mol *molptr );
void PrintPsatomS( Psatom *psatoms, const int pseudo_count );
void PrintPsatom( Psatom *psatoms );
